//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.jpgolay.me.print.options;

import java.awt.*;
import javax.swing.*;

public class GroupRowPanel extends JPanel {

    public GroupRowPanel() {
        referenceCheckBox = null;
        designationCheckBox = null;
        batchCheckBox = null;
        quantityCheckBox = null;
        priceListCheckBox = null;
        discountCheckBox = null;
        unitPriceCheckBox = null;
        linePriceCheckBox = null;
        taxCheckBox = null;
        initialize();
    }

    private void initialize() {
        FlowLayout flowLayout3 = new FlowLayout();
        setLayout(flowLayout3);
        setSize(600, 52);
        setBorder(BorderFactory.createTitledBorder(null, "Colonnes", 0, 0, new Font("Dialog", 1, 12), new Color(51, 51, 51)));
        flowLayout3.setHgap(2);
        flowLayout3.setVgap(2);
        add(getReferenceCheckBox(), null);
        add(getDesignationCheckBox(), null);
        add(getBatchCheckBox(), null);
        add(getQuantityCheckBox(), null);
        add(getPriceListCheckBox(), null);
        add(getDiscountCheckBox(), null);
        add(getUnitPriceCheckBox(), null);
        add(getLinePriceCheckBox(), null);
        add(getTaxCheckBox(), null);
    }

    private JCheckBox getReferenceCheckBox() {
        if (referenceCheckBox == null) {
            referenceCheckBox = new JCheckBox();
            referenceCheckBox.setPreferredSize(new Dimension(60, 20));
            referenceCheckBox.setText("R\351f");
        }
        return referenceCheckBox;
    }

    private JCheckBox getDesignationCheckBox() {
        if (designationCheckBox == null) {
            designationCheckBox = new JCheckBox();
            designationCheckBox.setPreferredSize(new Dimension(100, 20));
            designationCheckBox.setText("D\351signation");
        }
        return designationCheckBox;
    }

    private JCheckBox getBatchCheckBox() {
        if (batchCheckBox == null) {
            batchCheckBox = new JCheckBox();
            batchCheckBox.setPreferredSize(new Dimension(60, 20));
            batchCheckBox.setText("Lot");
        }
        return batchCheckBox;
    }

    private JCheckBox getQuantityCheckBox() {
        if (quantityCheckBox == null) {
            quantityCheckBox = new JCheckBox();
            quantityCheckBox.setPreferredSize(new Dimension(60, 20));
            quantityCheckBox.setText("Qt");
        }
        return quantityCheckBox;
    }

    private JCheckBox getPriceListCheckBox() {
        if (priceListCheckBox == null) {
            priceListCheckBox = new JCheckBox();
            priceListCheckBox.setPreferredSize(new Dimension(60, 20));
            priceListCheckBox.setText("P v/a");
        }
        return priceListCheckBox;
    }

    private JCheckBox getDiscountCheckBox() {
        if (discountCheckBox == null) {
            discountCheckBox = new JCheckBox();
            discountCheckBox.setPreferredSize(new Dimension(60, 20));
            discountCheckBox.setText("R (%)");
        }
        return discountCheckBox;
    }

    private JCheckBox getUnitPriceCheckBox() {
        if (unitPriceCheckBox == null) {
            unitPriceCheckBox = new JCheckBox();
            unitPriceCheckBox.setPreferredSize(new Dimension(60, 20));
            unitPriceCheckBox.setText("Pu ht");
        }
        return unitPriceCheckBox;
    }

    private JCheckBox getLinePriceCheckBox() {
        if (linePriceCheckBox == null) {
            linePriceCheckBox = new JCheckBox();
            linePriceCheckBox.setPreferredSize(new Dimension(60, 20));
            linePriceCheckBox.setText("Mt ht");
        }
        return linePriceCheckBox;
    }

    private JCheckBox getTaxCheckBox() {
        if (taxCheckBox == null) {
            taxCheckBox = new JCheckBox();
            taxCheckBox.setPreferredSize(new Dimension(50, 20));
            taxCheckBox.setText("TVA");
        }
        return taxCheckBox;
    }

    public JCheckBox getReference() {
        return getReferenceCheckBox();
    }

    public JCheckBox getDesignation() {
        return getDesignationCheckBox();
    }

    public JCheckBox getBatch() {
        return getBatchCheckBox();
    }

    public JCheckBox getQuantity() {
        return getQuantityCheckBox();
    }

    public JCheckBox getPriceList() {
        return getPriceListCheckBox();
    }

    public JCheckBox getDiscount() {
        return getDiscountCheckBox();
    }

    public JCheckBox getUnitPrice() {
        return getUnitPriceCheckBox();
    }

    public JCheckBox getLinePrice() {
        return getLinePriceCheckBox();
    }

    public JCheckBox getTax() {
        return getTaxCheckBox();
    }
    private JCheckBox referenceCheckBox;
    private JCheckBox designationCheckBox;
    private JCheckBox batchCheckBox;
    private JCheckBox quantityCheckBox;
    private JCheckBox priceListCheckBox;
    private JCheckBox discountCheckBox;
    private JCheckBox unitPriceCheckBox;
    private JCheckBox linePriceCheckBox;
    private JCheckBox taxCheckBox;
}
